<?php

/**
 * Empresas form base class.
 *
 * @package    espazio
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 12815 2008-11-09 10:43:58Z fabien $
 */
class BaseEmpresasForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'             => new sfWidgetFormInputHidden(),
      'nombre'         => new sfWidgetFormInput(),
      'url'            => new sfWidgetFormInput(),
      'logo'           => new sfWidgetFormInput(),
      'provincia'      => new sfWidgetFormInput(),
      'pais'           => new sfWidgetFormInput(),
      'multinacional'  => new sfWidgetFormInput(),
      'forma_juridica' => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'             => new sfValidatorPropelChoice(array('model' => 'Empresas', 'column' => 'id', 'required' => false)),
      'nombre'         => new sfValidatorString(array('max_length' => 100)),
      'url'            => new sfValidatorString(array('max_length' => 100)),
      'logo'           => new sfValidatorString(array('max_length' => 100)),
      'provincia'      => new sfValidatorString(array('max_length' => 100)),
      'pais'           => new sfValidatorString(array('max_length' => 100)),
      'multinacional'  => new sfValidatorString(array('max_length' => 1)),
      'forma_juridica' => new sfValidatorString(array('max_length' => 45, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('empresas[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Empresas';
  }


}
